<script>
	import SET from '@/SET.js';
	import Utils from '@/common/utils.js';


	import Vue from 'vue'
	import {
		mapState,
		mapMutations
	} from 'vuex';
	export default {
		data() {
			return {
				set: {
					appid: SET.appid, //测试环境
					redirect_uri: SET.redirect,
				},
				wxConfig: '',
				ifWxLogin: false //wx是微信登录 ，mm密码登录
			};
		},
		//#ifdef H5
		// mixins: [pageAnimation],
		// #endif
		onLaunch: function() {
			const token = uni.getStorageSync(SET.tokenName);
			let that = this;
			this.$api.getInfo({
				token
			}).then(res => {
				if (res.code === 20002) {
					uni.navigateTo({
						url: '/pages/user/login/login'
					})
				} else {
					this.$store.commit('userLogin',token)
					this.$store.commit('setUserInfo', res.result)
				}
			})
		},
		onShow: function() {},
		onHide: function() {
			console.log('App Hide')
		},
		methods: {}
	}
</script>

<style lang="scss">
	@import "uview-ui/index.scss";
	/*每个页面公共css */

	.pages {
		width: 100vw;
		min-height: 100vh;
		background-color: #f4f4f4;
	}

	view,
	text {
		font-size: 26rpx;
	}

	.hover {
		background-color: #f7f7f7;
		transform: translate(-1rpx, -1rpx);
	}

	.cm_action {
		width: 48rpx;
		height: 48rpx;
	}

	.cm_hover_m {
		transform: translate(-1rpx, -1rpx);
	}

	.hover_eee {
		background-color: #ccc;
	}

	.cm_boxs {
		background-color: #fff;
		margin-bottom: 16rpx;
		padding: 32rpx 30rpx;
	}

	.cm_title {
		color: #333;
		font-weight: 600;
		font-size: 30rpx;
		margin-bottom: 24rpx;
	}

	.cm_text {
		color: #999;
		font-size: 26rpx;
		line-height: 1;
	}

	.cm_time {
		color: #999;
		font-size: 24rpx;
		line-height: 1;
	}

	.cm_full {
		width: 100vw;
		height: 80vh;
	}

	.cm_ellipsis {
		text-overflow: ellipsis;
		white-space: nowrap;
		overflow: hidden;
	}

	.cm_ellipsis2 {
		display: -webkit-box;
		-webkit-box-orient: vertical;
		-webkit-line-clamp: 2;
		overflow: hidden;
		text-overflow: ellipsis;
	}

	.contain {
		width: 100%;
		height: auto;
	}

	.cm_bdb {
		position: relative;
	}

	.cm_bdb::before {
		content: '';
		width: 100%;
		height: 1rpx;
		background: #f1f1f1;
		transform: scaleY(.5);
		position: absolute;
		bottom: 0;
		left: 0;
	}

	.cm_price {
		color: #FA3534;
		font-size: 36rpx;
		font-weight: 600;

	}

	.cm_price_tip {
		color: #EE7F48;
		font-size: 44rpx;
		font-weight: 400;
		position: relative;
		text-indent: 30rpx;
	}

	.cm_price_tip::before {
		content: '￥';
		position: absolute;
		left: -28rpx;
		bottom: 0rpx;
		color: #EE7F48;
		font-size: 28rpx;
	}

	.cm_price_delete {
		color: #999;
		/* font-size: 28upx; */
		text-decoration: line-through;
	}

	.flex {
		display: -webkit-flex;
		display: flex;
		justify-content: center;
		align-items: center;
	}

	.u-flex-y,
	.flex-y {
		display: -webkit-flex;
		display: flex;
		justify-content: center;
		align-items: center;
		flex-direction: column;
	}

	.f1 {
		flex: 1;
	}

	.f2 {
		flex: 2;
	}

	uni-button {
		background-color: #fff;
		border: none;
	}

	uni-button::after {
		border: none;
	}

	.cm_tags {
		border-radius: 40rpx;
		border: 1rpx solid #f1f1f1;
	}

	.saveBottom {
		padding-bottom: constant(safe-area-inset-bottom);
		padding-bottom: env(safe-area-inset-bottom);

	}

	.cm_bg {
		width: 100%;
		height: 100%;
		position: absolute;
		z-index: 0;
	}
</style>
